# 怎么样调用父类上被重写的方法

# 定义goods
class Goods:
    def __init__(self, name, price):
        self.name = name
        self.price = price

    def info(self):
        print(f'名字：{self.name}, 单价：{self.price}')


# 定义phone
class Phone(Goods):
    def __init__(self, name, price, brand, os):
        # 调用父类的__init__方法
        super().__init__(name, price)
        self.brand = brand
        self.os = os

    def info(self):
        super().info()
        print(self.brand)
        print(self.os)


p1 = Phone('iPhone13', 5999, 'apple', 'ios')
p1.info()









